package com.bart.hsp.chapter05.myexception

import java.io.IOException

object ThrowsComment {
  def main(args: Array[String]): Unit = {
    f11()
  }

  /**
   * 抛出多个异常，使用多个注解
   * @throws java.io.IOException
   * @throws java.lang.NumberFormatException
   * @return
   */
  @throws(classOf[IOException])("发生了IO异常") // 自定义message
  @throws(classOf[NumberFormatException]) //等同于Java NumberFormatException.class
  def f11() = {
    "abc".toInt
  }

}
